package com.ouc.yyi.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ouc.yyi.bean.User;
import com.ouc.yyi.dao.QueryUserMapper;
import com.ouc.yyi.service.QueryUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.ContextLoaderListener;

import javax.annotation.Resource;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import java.util.List;

@WebService(endpointInterface = "com.ouc.yyi.service.QueryUserService")
public class QueryUserServiceImpl implements QueryUserService {
    private QueryUserMapper queryUserMapper;
    @WebMethod
    @ResponseBody
    public List<User> selectUserBuId(@WebParam(name = "id") int id) {
        queryUserMapper = ContextLoaderListener.getCurrentWebApplicationContext().getBean(QueryUserMapper.class);
        return queryUserMapper.selectUserById(id);
    }
}
